<template>
    <div class="download-tools">
        <div class="tools-title">
            <b></b>
            <span>工具下载</span>
        </div>
        <div class="tools-list">
            <div class="tools-item" v-for="(item,index) in toolsList" :key="index">
                <div class="item-left">
                    <img :src="item.src" alt="">
                     <div class="item-text">
                        <p>{{ item.name }}</p>
                        <span>{{ item.desc }}</span>
                    </div>
                </div>
                <div class="item-btn" @click="handleClick(item)">
                    <img :src="item.btnIcon" alt="">
                    <span>{{ item.btnText }}</span>
                </div>
            </div>
        </div>
        <div class="xiazaitishi" v-if="isShowTips">
            <div class="tsbox">
                <p>点猫编程平台检测到你的浏览器是Interner.<br>Explorer内核，与点猫科技使用的新技术存在许多兼容性问题;<br>推荐使用[Google]浏览器体验完整功能。</p>
                <div class="tsright">
                    <img src="../../../assets/images/guge.png" alt="">
                    <div>
                        <span>Google浏览器</span>
                        <button class="xzbtn" @click="downLoad">立即下载</button>
                    </div>
                </div>
            </div>
            <img class="guanbi" @click="isShowTips = false" src="@/assets/icons/close.png" alt="">
        </div>
    </div>
</template>
<script>
export default {
  name: "downloadTools",
  data() {
    return {
        toolsList: [
            {
                src: require('@/assets/images/tools1.png'),
                name: 'Labplus3.0',
                desc: '简易图形化工具',
                btnIcon: require('@/assets/icons/deng.png'),
                btnText: '在线创作',
                path: 'http://labplus.cn/labplus3.0/'
            },
            {
                src: require('@/assets/images/tools2.png'),
                name: 'mPython',
                desc: '掌控板编程软件',
                btnIcon: require('@/assets/icons/deng.png'),
                btnText: '在线创作',
                path: 'http://mpython.labplus.cn/'
            },
            {
                src: require('@/assets/images/tools3.png'),
                name: '大圣闯关',
                desc: '图像化闯关游戏',
                btnIcon: require('@/assets/icons/chuangguan.png'),
                btnText: '在线闯关',
                path: 'https://mpython.labplus.cn/'
            },
            {
                src: require('@/assets/images/tools4.png'),
                name: 'chrome浏览器',
                desc: '完美兼容盛思ai课堂',
                btnIcon: require('@/assets/icons/xiazai.png'),
                btnText: '下载',
                path: 'https://www.google.cn/chrome/'
            }
        ],
        isShowTips: true,
    };
  },
  methods: {
    handleClick(item) {
        window.open(item.path);
    },
    downLoad() {
        window.open('https://www.google.cn/chrome/');
    }
  },
};

</script>
<style lang="less" scoped>
.download-tools{
    width: 100%;
    .tools-title{
        display: flex;
        align-items: center;
        padding-bottom: 20px;
        border-bottom: 1px solid #E9E6F2;
        b{
            width: 4px;
            height: 18px;
            background: linear-gradient( 90deg, #3881F8 0%, #5EA3FE 100%);
            border-radius: 7px;
            display: block;
            margin-right: 12px;
        }
        span{
            font-weight: 600;
            font-size: 20px;
            color: #0C0D0E;
        }
    }
    .tools-list{
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        margin-top: 22px;
        height: 40vh;
        .tools-item{
            width: 390px;
            height: 80px;
            background: #FFFFFF;
            box-shadow: 0px 2px 12px 0px #E1E3EB;
            border-radius: 12px;
            border: 1px solid #FFFFFF;
            padding: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            .item-left{
                display: flex;
                justify-content: flex-start;
                img{
                    width: 46px;
                    height: 46px;
                    margin-right: 15px;
                }
                .item-text{
                    p{
                        font-weight: 500;
                        font-size: 18px;
                        color: #12192D;
                        margin-bottom: 0px;
                    }
                    span{
                        font-weight: 400;
                        font-size: 13px;
                        color: #787878;
                    }
                }
            }
            .item-btn{
                width: 110px;
                height: 40px;
                line-height: 40px;
                background: linear-gradient(90deg, #3881F8 0%, #5EA3FE 100%);
                border-radius: 8px;
                display: flex;
                justify-content: center;
                cursor: pointer;
                img{
                    width: 20px;
                    height: 20px;
                    margin-top: 10px;
                    margin-right: 5px;
                }
                span{
                    font-weight: 400;
                    font-size: 15px;
                    color: #FAFBFF;
                }
            }
        }
    }
    .xiazaitishi{
        width: 100%;
        height: 126px;
        background: #59ADFF;
        position: relative;
        .tsbox{
            width: 80%;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
        }
        p{
            font-weight: 400;
            font-size: 14px;
            color: #FFFFFF;
            text-align: left;
            line-height: 30px;
            padding-top: 20px;
        }
        .tsright{
            display: flex;
            align-items: center;
            img{
                width: 64px;
                height: 64px;
                margin-right: 50px;
            }
            span{
                font-weight: 400;
                font-size: 18px;
                color: #FFFFFF;
                display: block;
                margin-bottom: 10px;
            }
            .xzbtn{
                width: 134px;
                height: 40px;
                line-height: 40px;
                background: linear-gradient( 90deg, #FF6A00 0%, #FFC210 100%);
                border-radius: 100px;
                font-weight: 400;
                font-size: 16px;
                color: #FFFFFF;
                border: none;
                cursor: pointer;
            }
        }
        .guanbi{
            width: 24px;
            height: 24px;
            position: absolute;
            right: 10px;
            top: 10px;
        }
    }
}
</style>